<div [@routerTransition]>
    <div class="m-content">
      
                <div class="m-portlet m-portlet--mobile"  *ngIf="roomshow">
                        <div class="m-portlet__head">
                                <div class="m-portlet__head-caption">
                                    <div class="m-portlet__head-title">
                                        <h3 class="m-portlet__head-text">
                                            仓库详细信息
                                        </h3>
                                    </div>
                                </div>
                            </div>
                        <div class="m-subheader" >
                            
                                <div class="align-items-center row" style="margin: 0;">
                                    

                                    <div class="row">
                                            <div class="col-md-3">

                                                    <div class="float-left" style="min-width: 280px;">
                                                            <label>仓库编号:</label>
                                                            <input
                                                                [(ngModel)]="roomdeitailinfo.f_WarehouseCode"
                                                                style="width: 140px; display: inline-block; margin: 0 10px;"
                                                                name="f_WarehouseCode"
                                                                #nameInput="ngModel"
                                                                class="form-control m-input"
                                                               
                                                                type="text"
                                                                readonly
                                                            />
                                                        </div>
                                         
                                            </div>
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                <label for="f_WarehouseName">仓库名称: </label>
                                                <input id="f_WarehouseName" readonly style="width: 140px; display: inline-block; margin: 0 10px;" #nameInput="ngModel" class="form-control" type="text" name="f_WarehouseName" [(ngModel)]="roomdeitailinfo.f_WarehouseName"  maxlength="32" />
                                            
                                            </div>
                                            </div>
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                <label for="f_WarehouseType">仓库类别: </label>
                                                <input id="f_WarehouseType" readonly #nameInput="ngModel" style="width: 140px; display: inline-block; margin: 0 10px;"  class="form-control"  type="text" name="f_WarehouseType" [(ngModel)]="roomdeitailinfo.f_WarehouseType" maxlength="32" />
                                              
                                            </div>
                                            </div>
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                    <label for="f_StockType">库存类型: </label>
                                                    <input id="f_StockType" readonly #nameInput="ngModel" class="form-control" style="width: 140px; display: inline-block; margin: 0 10px;"   type="text" name="f_StockType" [(ngModel)]="roomdeitailinfo.f_StockType" maxlength="32" />
                                                 
                                                </div>
                                            </div>
                                     </div>
       
                                     <div class="row" style="margin-top:5px">
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                <label for="f_StockLevel">仓库级别 </label>
                                                <input id="f_StockLevel" readonly #nameInput="ngModel" class="form-control" style="width: 140px; display: inline-block; margin: 0 10px;"  type="text" name="f_StockLevel" [(ngModel)]="roomdeitailinfo.f_StockLevel"  maxlength="32" />
                                            </div>
                                            </div>
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                <label for="f_Department">所属部门 </label>
                                                <input id="f_Department" readonly #nameInput="ngModel" style="width: 140px; display: inline-block; margin: 0 10px;"  class="form-control" type="text" name="f_Department" [(ngModel)]="roomdeitailinfo.f_Department"  maxlength="32" />
                                            </div>
                                            </div>
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                <label for="f_DefaultLocationReceipt" >收货库位 </label>
                                                <input id="f_DefaultLocationReceipt" readonly #nameInput="ngModel" style="width: 140px; display: inline-block; margin: 0 10px;"  class="form-control"  type="text" name="f_DefaultLocationReceipt" [(ngModel)]="roomdeitailinfo.f_DefaultLocationReceipt" maxlength="32" />
                                            </div>
                                            </div>
                                            <div class="col-md-3">
                                                    <div class="float-left" style="min-width: 280px;">
                                                    <label for="f_DefaultLocationIssue">发货库位 </label>
                                                    <input id="f_DefaultLocationIssue" readonly #nameInput="ngModel" style="width: 140px; display: inline-block; margin: 0 10px;"  class="form-control"  type="text" name="f_DefaultLocationIssue" [(ngModel)]="roomdeitailinfo.f_DefaultLocationIssue" maxlength="32" />
                                                </div>
                                            </div>
                                     </div>
                                </div>
                            </div>
                    <div class="m-portlet__body" style="border-top: 1px solid #ebedf2;  margin-top: 11px;">
                            <div class="m-subheader">
                                    <div class="align-items-center row" style="margin: 0;">
                            <div class="float-right ml-auto" style="margin-left: 10px; min-width: 160px;">
                                    <button
                                        (click)="createOrEditlocationModal.show(undefined,roomId,roomdeitailinfo.f_WarehouseCode)"
                                        *ngIf="permission.isGranted('Pages.Administration.Roles')"
                                        class="btn btn-primary blue"
                                    >
                                        新增
                                    </button>
                               
                                        <button
                                            (click)="createOrEditlocationModal.show(selectedValue.id,roomId,roomdeitailinfo.f_WarehouseCode)"
                                            class="btn btn-primary blue"
                                            type="submit"
                                        >
                                            <i [attr.aria-label]="l('Update')"> </i> 更新
                                        </button>
                                        <button (click)="delete(selectedValue.id)" class="btn btn-danger" type="submit">
                                            <i [attr.aria-label]="l('Delete')"> </i> 删除
                                        </button>
                                </div>
</div>
                            </div>
                        <div class="tabbable-line">
                            <div class="tab-content" style="padding-top:0;">
                                <div class="tab-pane active" id="tab-model">
                                    <div class="row align-items-center">
                                            <div class="primeng-datatable-container" [busyIf]="primengTableHelper.isLoading">
                                                    <p-table
                                                        #dataTable
                                                        (onLazyLoad)="getLocationData($event)"
                                                        [value]="primengTableHelper.records"
                                                        [rows]="primengTableHelper.defaultRecordsCountPerPage"
                                                        [paginator]="false"
                                                        [lazy]="true"
                                                        [scrollable]="true"
                                                        ScrollWidth="100%"
                                                        [responsive]="primengTableHelper.isResponsive"
                                                        [resizableColumns]="primengTableHelper.resizableColumns"
                                                        [(selection)]="selectedValue"
                                                        selectionMode="single"
                                                    >
                                                        <ng-template pTemplate="header">
                                                            <tr>
                                                           
                                                                <th style="width: 40px">
                                                                    序号
                                                                </th>
                                                                <ng-container *ngFor="let ext of extensions">
                                                                    <th width="{{ ext.width }}">
                                                                        {{ ext.title }}
                                                                    </th>
                                                                </ng-container>
                                                            </tr>
                                                        </ng-template>
                
                                                        <ng-template pTemplate="body" let-record="$implicit" let-i="rowIndex">
                                                            <tr [pSelectableRow]="record">
                                                            
                                                                <td style="width: 40px">
                                                                    {{ i + 1 + paginator.first }}
                                                                </td>
                                                                <ng-container *ngFor="let ext of extensions">
                                                                    <ng-container [ngSwitch]="ext.formatType">
                                                                        <ng-container *ngSwitchCase="1">
                                                                            <td width="{{ ext.width }}">
                                                                                {{ record[ext.key] | number: '1.0-0' }}
                                                                            </td>
                                                                        </ng-container>
                                                                        <ng-container *ngSwitchCase="2">
                                                                            <td width="{{ ext.width }}">
                                                                                {{ record[ext.key] | number: '1.2-2' }}
                                                                            </td>
                                                                        </ng-container>
                                                                        <ng-container *ngSwitchCase="4">
                                                                            <td width="{{ ext.width }}">
                                                                                {{ record[ext.key] | momentFormat: 'YYYY-MM-DD' }}
                                                                            </td>
                                                                        </ng-container>
                                                                        <ng-container *ngSwitchDefault>
                                                                            <td width="{{ ext.width }}">
                                                                                {{ record[ext.key] }}
                                                                            </td>
                                                                        </ng-container>
                                                                    </ng-container>
                                                                </ng-container>
                                                            </tr>
                                                        </ng-template>
                                                    </p-table>
                
                                                    <div class="primeng-paging-container">
                                                        <p-paginator
                                                            [rows]="20"
                                                            #paginator
                                                            (onPageChange)="getLocationData($event)"
                                                            [totalRecords]="primengTableHelper.totalRecordsCount"
                                                            [rowsPerPageOptions]="primengTableHelper.predefinedRecordsCountPerPage"
                                                        >
                                                        </p-paginator>
                                                        <span class="total-records-count">
                                                            {{ l('TotalRecordsCount', primengTableHelper.totalRecordsCount) }}
                                                        </span>
                                                    </div>
                                                </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
          
       
    </div>
    <createOrEditlocationModal #createOrEditlocationModal (modalSave)="getLocationData()"></createOrEditlocationModal>
</div>
